//
//  ByBlueToothHandleModel.h
//  laserdevice_ios
//
//  Created by pro on 16/12/8.
//  Copyright © 2016年 com.itboye. All rights reserved.
//

#import <Foundation/Foundation.h>

#import <CoreBluetooth/CoreBluetooth.h>
#import "BabyBluetooth.h"

#define channelOnPeropheralView @"peripheralView"

@interface ByBlueToothHandleModel : NSObject
{
    void (^ _callBack)(NSString *dataHex);
}
@property (nonatomic, strong) CBPeripheral *currPeripheral;
@property (nonatomic, strong) BabyBluetooth *baby;
@property (nonatomic, strong) CBCharacteristic *characteristic;

@property (nonatomic, copy) void (^successBlock)(void);

@property (nonatomic, assign) bool needShowAlert;


// 获取单例
+ (instancetype)shareInstance;

- (void)babyDelegate;
- (void)babyDelegateTest;

// 连接当前的蓝牙设备
- (void)connectPeripheral;


// 开始通知
- (void)startNotify;

#pragma mark - 功能接口
// 开始距离显示
- (void)startDistanceMeasure:(void (^)(NSString *dataHex))callBack withOneMeasure:(BOOL)needOneMeasure;
// 开始实时测量
- (void)startRealTimeMeasure:(void (^)(NSString *dataHex))callBack;
// 关闭实时测量
- (void)closeRealTimeMeasure;
// 获取历史数据
- (void)getHistoryMeasure:(void (^)(NSString *dataHex))callBack;
// 关闭历史数据测量
- (void)closeHistoryMeasure;

@end
